Although the keyboard is the primary computer input device in a computer system, the prevalence of graphical user interfaces (GUIs) virtually require the use pointing device such as a mouse.
A mouse uses a roller ball which rests against two rollers for translating X- and Y-axis movement into electrical signals, e.g., via an optical or opto-mechanical mechanism. A mouse will typically have a hand-sized housing and is operated by moving the mouse around on a flat surface such as a desktop or mouse pad. Similarly, a trackball is essentially the same as the mouse in terms design, functionality, and electrical interface, but is used upside down. Rather than moving the entire device, the device is stationary with the roller ball facing upward wherein the ball may be turned with the hand directly.
Mouse button and position data are typically sent in 11-bit data bytes consisting of eight data bits plus framing and control bits. Mouse information is typically sent as three consecutive bytes. For a typical mouse such as a PS/2 mouse, the first byte of the three byte mouse data packet provides information regarding the left and right button state; the second byte of the three byte mouse data packet provides movement or displacement in the X-direction; and the third byte of the three byte mouse data packet provides movement or displacement in the Y-direction. Typically the first byte of the three byte mouse data packet will further contain data for direction of movement in the X-direction, direction of movement in the Y-direction, as well as X- and Y-overflow data bits.
In the typical mouse protocol, such as the PS/2 mouse protocol, there is no synchronization bit provided, so if a hardware communication error occurs, and one of the three bytes of the three byte mouse data packet is lost, the mouse driver will interpret the next byte received erroneously. For example, if the first data packet with button state information is lost, the second byte with X-displacement information will be erroneously interpreted as the first (button state) byte, and so forth. As a result, all subsequent mouse packets will be erroneously interpreted by the mouse driver until the mouse can be resynchronized with the driver.
It would be desirable to provide software that could improve mouse reliability by identifying and discarding faulty mouse data and resynchronizing the mouse with the mouse driver. In order to avoid replacing the standard mouse driver, which may contain very efficient hardware-dependent code, it would also be desirable to provide this functionality as a standalone virtual device driver rather than a replacement mouse driver or mouse minidriver.